import request from "@/utils/request";
import { ljVersion } from "./pathway";
import qs from "qs";

export const pcbyid = (params: any) =>
  request({
    url: "/api/pcbyid",
    method: "get",
    params,
  });

export const getProType = (params: any) =>
  request({
    url: "/api/getProType",
    method: "get",
    params,
  });

export const pathway2cost = (params: any) =>
  request({
    url: "/api/pathway2cost",
    method: "get",
    params,
  });

export const pro2cost = (params: any) =>
  request({
    url: "/api/pro2cost",
    method: "get",
    params,
  });

export const autoProType = (params: any) =>
  request({
    url: "/api/auto-proType",
    method: "get",
    params,
  });

// export const saveTpl = (params: any) =>
// request({
//   url: '/api/save-tpl',
//   method: 'post',
//   params
// })

export const saveTpl = (params: any) => request.post("/api/save-tpl", params);

//导入临床路径模板接口
export const saveTplOther = (params: any) =>
  request.post("/api/import-tpl", params);

export const SoftVersion = () =>
  request({
    url: "/api/version",
    method: "get",
  });

/**
 * 获取自动填充药目名称等信息
 * @param params
 * @returns
 */
export const autoName = (params: any) =>
  request({
    url: "/api/auto-name",
    params: params,
  });

/**
 * V临床路径目录
 * @returns
 */
export const autoFillLjdir = (params: any) =>
  request({
    url: "/api/ljdir",
    method: "get",
  });

export const sysSetting = (params: any) =>
  request({
    url: "/sys/jc-settings",
    method: "get",
    params: params,
  });

export const edSetting = (params: any) =>
  request({
    url: "/sys/ed-setting",
    method: "post",
    data: params,
  });

//drug-instru
export const drugInstru = (data: any) =>
  request({
    url: "/api/drug-instru",
    method: "post",
    data: data,
  });

export const LsFiles = (data: any) =>
  request({
    url: "/api/ls-files",
    method: "post",
    data: qs.stringify(data),
  });
  export const listFiles = (data: any) =>
  request({
    url: "/api/list-files",
    method: "post",
    data: qs.stringify(data),
  });
export const DestoryFile = (data: any) =>
  request({
    url: "/api/destory-file",
    method: "post",
    data: qs.stringify(data),
  });
export const PathForm = (data: any) =>
  request({
    url: "/api/PathForm",
    method: "post",
    data,
  });

export const groupProxy = (data: any) =>
  request({
    url: "/chs/groupProxy",
    method: "post",
    data,
  });

export const groupSearch = (data: any) =>
  request({
    url: "/chs/preInfo",
    method: "post",
    data,
  });

//destory-file
